// @charset "utf-8";
define(function(require, exports, module) {
	var publicMethod = {
		urlList: {
			zdtjUrl: 'http://10.10.14.128:1080/test/chenyj/crm55265/index.php?market=USHA_USZA&datatype=zhangfustats_detail',
			fblUrl: 'http://hqstats.10jqka.com.cn/app.php?appname=ztbx',
			hsgtUrl: 'http://zx.10jqka.com.cn/i/externalapi/gethsgtzjdx/date/',
			pjhcUrl: 'http://zx.10jqka.com.cn/file/homepage/getpjhc/'
		},
		init: function() {
			Highcharts.setOptions({
				lang: {
					// rangeSelectorZoom: '',
					thousandsSep: ''
				}
				// global: {
				// 	useUTC: false
				// }
			});
			if (!Array.indexOf) {
				Array.prototype.indexOf = function(obj) {
					for (var i = 0; i < this.length; i++) {
						if (this[i] == obj) {
							return i;
						}
					}
					return -1;
				}
			}
			$.fn.hoverDelay = function(options) {
				var defaults = {
					hoverDuring: 200,
					outDuring: 200,
					hoverEvent: function() {
						$.noop();
					},
					outEvent: function() {
						$.noop();
					}
				};
				var sets = $.extend(defaults, options || {});

				return this.each(function() {
					var hoverTimer, outTimer;
					var $this = $(this);
					$this.hover(function() {
						clearTimeout(outTimer);
						hoverTimer = setTimeout(function () {
							sets.hoverEvent($this);
						}, sets.hoverDuring);
					}, function() {
						clearTimeout(hoverTimer);
						outTimer = setTimeout(function () {
							sets.outEvent($this);
						}, sets.outDuring);
					});
				});
			}
		},
		ajaxJson: function(paramobj) {
			$.support.cors = true;
			var defaultparam = {
				type: 'GET',
				url: '',
				data: {},
				cache: false,
				callback: ''
			};
			var param = $.extend(defaultparam, paramobj);
			$.ajax({
				type: param.type,
				url: param.url,
				data: param.data,
				cache: param.cache,
				dataType: 'json',
				success: function(result) {
					param.callback(result);
				},
				error: function(e) {
					param.callback();
				}
			});
		},
		ajaxJsonp: function(paramobj) {
			var defaultparam = {
				url: '',
				data: {},
				cache: false,
				jsonpCallback: '',
				callback: ''
			};
			var param = $.extend(defaultparam, paramobj);
			$.ajax({
				type: 'GET',
				url: param.url,
				data: param.data,
				cache: param.cache,
				dataType: 'jsonp',
				jsonp: false,
				jsonpCallback: param.jsonpCallback,
				success: function(result) {
					param.callback(result);
				},
				error: function(e) {
					param.callback();
				}
			});
		},
		stopPropagation: function(e) {
			if (e && e.stopPropagation) {
				e.stopPropagation();
			} else {
				e.cancelBubble = true;
			}
		},

		throttle: function(fn, threshhold, scope) {
			threshhold = threshhold || 250;
			var lastPub,
				timerPub;
			return function() {
				var context = scope || this;
				var now = +new Date(),
					args = arguments;
				if (lastPub && now - lastPub < threshhold) {
					clearTimeout(timerPub);
					var delay = threshhold - (now - lastPub);
					timerPub = setTimeout(function() {
						lastPub = +new Date();
						fn.apply(context, args);
					}, delay);
				} else {
					lastPub = now;
					fn.apply(context, args);
				}
			};
		},
		getRandomArrayElements: function(arr, count) {
			var shuffled = arr.slice(0),
				i = arr.length,
				min = i - count,
				temp, index;
			while (i-- > min) {
				index = Math.floor((i + 1) * Math.random());
				temp = shuffled[index];
				shuffled[index] = shuffled[i];
				shuffled[i] = temp;
			}
			return shuffled.slice(min);
		},
		getCookie: function(name) {
			var arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)");
			if (arr = document.cookie.match(reg))
				return unescape(arr[2]);
			else
				return null;
		},
		extendClass: function(Child, Parent) {
			var F = function() {};
			F.prototype = Parent.prototype;
			Child.prototype = new F();
			Child.prototype.constructor = Child;
			Child.uber = Parent.prototype;
		},
		dateSplit: function(date) {
			var dateStr = date.toString();
			return dateStr.substr(0, 4) + '-' + dateStr.substr(4, 2) +
				'-' + dateStr.substr(6, 2);
		},

		xAxisData: ["09:30", "09:31", "09:32", "09:33", "09:34", "09:35", "09:36", "09:37", "09:38", "09:39", "09:40", "09:41", "09:42", "09:43", "09:44", "09:45", "09:46", "09:47", "09:48", "09:49", "09:50", "09:51", "09:52", "09:53", "09:54", "09:55", "09:56", "09:57", "09:58", "09:59", "10:00", "10:01", "10:02", "10:03", "10:04", "10:05", "10:06", "10:07", "10:08", "10:09", "10:10", "10:11", "10:12", "10:13", "10:14", "10:15", "10:16", "10:17", "10:18", "10:19", "10:20", "10:21", "10:22", "10:23", "10:24", "10:25", "10:26", "10:27", "10:28", "10:29", "10:30", "10:31", "10:32", "10:33", "10:34", "10:35", "10:36", "10:37", "10:38", "10:39", "10:40", "10:41", "10:42", "10:43", "10:44", "10:45", "10:46", "10:47", "10:48", "10:49", "10:50", "10:51", "10:52", "10:53", "10:54", "10:55", "10:56", "10:57", "10:58", "10:59", "11:00", "11:01", "11:02", "11:03", "11:04", "11:05", "11:06", "11:07", "11:08", "11:09", "11:10", "11:11", "11:12", "11:13", "11:14", "11:15", "11:16", "11:17", "11:18", "11:19", "11:20", "11:21", "11:22", "11:23", "11:24", "11:25", "11:26", "11:27", "11:28", "11:29", "11:30", "13:00", "13:01", "13:02", "13:03", "13:04", "13:05", "13:06", "13:07", "13:08", "13:09", "13:10", "13:11", "13:12", "13:13", "13:14", "13:15", "13:16", "13:17", "13:18", "13:19", "13:20", "13:21", "13:22", "13:23", "13:24", "13:25", "13:26", "13:27", "13:28", "13:29", "13:30", "13:31", "13:32", "13:33", "13:34", "13:35", "13:36", "13:37", "13:38", "13:39", "13:40", "13:41", "13:42", "13:43", "13:44", "13:45", "13:46", "13:47", "13:48", "13:49", "13:50", "13:51", "13:52", "13:53", "13:54", "13:55", "13:56", "13:57", "13:58", "13:59", "14:00", "14:01", "14:02", "14:03", "14:04", "14:05", "14:06", "14:07", "14:08", "14:09", "14:10", "14:11", "14:12", "14:13", "14:14", "14:15", "14:16", "14:17", "14:18", "14:19", "14:20", "14:21", "14:22", "14:23", "14:24", "14:25", "14:26", "14:27", "14:28", "14:29", "14:30", "14:31", "14:32", "14:33", "14:34", "14:35", "14:36", "14:37", "14:38", "14:39", "14:40", "14:41", "14:42", "14:43", "14:44", "14:45", "14:46", "14:47", "14:48", "14:49", "14:50", "14:51", "14:52", "14:53", "14:54", "14:55", "14:56", "14:57", "14:58", "14:59", "15:00"],
		hsgtXAxisData: ["09:10", "09:11", "09:12", "09:13", "09:14", "09:15", "09:16", "09:17", "09:18", "09:19", "09:20", "09:21", "09:22", "09:23", "09:24", "09:25", "09:26", "09:27", "09:28", "09:29", "09:30", "09:31", "09:32", "09:33", "09:34", "09:35", "09:36", "09:37", "09:38", "09:39", "09:40", "09:41", "09:42", "09:43", "09:44", "09:45", "09:46", "09:47", "09:48", "09:49", "09:50", "09:51", "09:52", "09:53", "09:54", "09:55", "09:56", "09:57", "09:58", "09:59", "10:00", "10:01", "10:02", "10:03", "10:04", "10:05", "10:06", "10:07", "10:08", "10:09", "10:10", "10:11", "10:12", "10:13", "10:14", "10:15", "10:16", "10:17", "10:18", "10:19", "10:20", "10:21", "10:22", "10:23", "10:24", "10:25", "10:26", "10:27", "10:28", "10:29", "10:30", "10:31", "10:32", "10:33", "10:34", "10:35", "10:36", "10:37", "10:38", "10:39", "10:40", "10:41", "10:42", "10:43", "10:44", "10:45", "10:46", "10:47", "10:48", "10:49", "10:50", "10:51", "10:52", "10:53", "10:54", "10:55", "10:56", "10:57", "10:58", "10:59", "11:00", "11:01", "11:02", "11:03", "11:04", "11:05", "11:06", "11:07", "11:08", "11:09", "11:10", "11:11", "11:12", "11:13", "11:14", "11:15", "11:16", "11:17", "11:18", "11:19", "11:20", "11:21", "11:22", "11:23", "11:24", "11:25", "11:26", "11:27", "11:28", "11:29", "11:30", "13:00", "13:01", "13:02", "13:03", "13:04", "13:05", "13:06", "13:07", "13:08", "13:09", "13:10", "13:11", "13:12", "13:13", "13:14", "13:15", "13:16", "13:17", "13:18", "13:19", "13:20", "13:21", "13:22", "13:23", "13:24", "13:25", "13:26", "13:27", "13:28", "13:29", "13:30", "13:31", "13:32", "13:33", "13:34", "13:35", "13:36", "13:37", "13:38", "13:39", "13:40", "13:41", "13:42", "13:43", "13:44", "13:45", "13:46", "13:47", "13:48", "13:49", "13:50", "13:51", "13:52", "13:53", "13:54", "13:55", "13:56", "13:57", "13:58", "13:59", "14:00", "14:01", "14:02", "14:03", "14:04", "14:05", "14:06", "14:07", "14:08", "14:09", "14:10", "14:11", "14:12", "14:13", "14:14", "14:15", "14:16", "14:17", "14:18", "14:19", "14:20", "14:21", "14:22", "14:23", "14:24", "14:25", "14:26", "14:27", "14:28", "14:29", "14:30", "14:31", "14:32", "14:33", "14:34", "14:35", "14:36", "14:37", "14:38", "14:39", "14:40", "14:41", "14:42", "14:43", "14:44", "14:45", "14:46", "14:47", "14:48", "14:49", "14:50", "14:51", "14:52", "14:53", "14:54", "14:55", "14:56", "14:57", "14:58", "14:59", "15:00"]
	};

	module.exports = publicMethod;
});